GdkMacosSurface *surface);
void _gdk_macos_display_remove_frame_callback (GdkMacosDisplay *self,
GdkMacosSurface *surface);
-void _gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
- GdkMacosSurface *surface);
NSWindow *_gdk_macos_display_find_native_under_pointer (GdkMacosDisplay *self,
int *x,
int *y);
return ret;
}
-void
-_gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
- GdkMacosSurface *surface)
-{
- GdkModifierType state;
- GdkEvent *event;
- GdkSeat *seat;
- NSPoint point;
- GList *node;
- int x;
- int y;
-
- g_return_if_fail (GDK_IS_MACOS_DISPLAY (self));
- g_return_if_fail (GDK_IS_MACOS_SURFACE (surface));
-
- seat = gdk_display_get_default_seat (GDK_DISPLAY (self));
- point = [NSEvent mouseLocation];
- _gdk_macos_display_from_display_coords (self, point.x, point.y, &x, &y);
-
- state = _gdk_macos_display_get_current_keyboard_modifiers (self) |
- _gdk_macos_display_get_current_mouse_modifiers (self);
-
- event = gdk_motion_event_new (GDK_SURFACE (surface),
- gdk_seat_get_pointer (seat),
- NULL,
- get_time_from_ns_event ([NSApp currentEvent]),
- state,
- x,
- y,
- NULL);
- node = _gdk_event_queue_append (GDK_DISPLAY (self), event);
- _gdk_windowing_got_event (GDK_DISPLAY (self), node, event,
- _gdk_display_get_next_serial (GDK_DISPLAY (self)));
-}
-
void
_gdk_macos_display_send_button_event (GdkMacosDisplay *self,
NSEvent *nsevent)
* ("is not key"). We send a dummy motion notify event now, so that
* everything in the window is set to correct state.
*/
- _gdk_macos_display_synthesize_motion (self, surface);
+ gdk_surface_request_motion (surface);
}
void